From 18244534612a475811066e983a15c81ea54d8556 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 4 May 2009 09:31:34 +0000 Subject: [PATCH] (bug 18657) Workaround for MySQL optimiser bug. Replaces Domas's live patch. --- includes/LogEventsList.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 18a0a7e10b..40204d0bdd 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -726,6 +726,17 @@ class LogPager extends ReverseChronologicalPager { public function getTagFilter() { return $this->mTagFilter; } + + public function doQuery() { + // Work around MySQL optimizer bug + if ( in_array( get_class( $this->mDb ), array( 'Database', 'DatabaseMysql' ) ) ) { + $this->mDb->query( 'SET SQL_BIG_SELECTS=1' ); + parent::doQuery(); + $this->mDb->query( 'SET SQL_BIG_SELECTS=0' ); + } else { + parent::doQuery(); + } + } } /** -- 2.20.1